package com.cheng.example.atguigu.view2;

import sun.misc.VM;

import java.nio.ByteBuffer;

/**
 *
 * -Xms10m -Xmx10m -XX:+PrintGCDetails -XX:MaxDirectMemorySize=5m
 *
 */
public class Client84 {

    public static void main(String[] args) {
        System.out.println("配置的最大直接内存："+VM.maxDirectMemory()/1024/1024+"MB");
        ByteBuffer bb = ByteBuffer.allocateDirect(6 * 1024 * 1024);
    }
}
